## build CMakeList of the executable file

# cmake_minimum_required(VERSION 3.16)

message(STATUS "target modckadd name:" ${libModAdd})

# option(MOD_NOT_NEED_CFG "MOD_NOT_NEED_CFG cfg " OFF)

set (executeName ckadd)
message(STATUS "---" ${executeName})

include_directories(../modadd)

if (MOD_NOT_NEED_CFG)
    message(STATUS "MOD_NOT_NEED_CFG ON.")
    #add_definitions(-DTEST_OPTION)
else ()
    message(STATUS "MOD_NOT_NEED_CFG OFF.")
    return()
endif(MOD_NOT_NEED_CFG)

set(SOURCE_FILES ckadd.cpp )

add_executable(${executeName} ${SOURCE_FILES})
target_link_libraries(${executeName} -ldl -lm -lpthread -lrt ${libModAdd})

install(TARGETS ${executeName}
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION lib
    PUBLIC_HEADER DESTINATION include
)
